Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix wrong relative phase of MCRZ (backport #9836) #10141

Merged
merged 2 commits into from
May 23, 2023

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented May 22, 2023

This is an automatic backport of pull request #9836 done by Mergify.
Cherry-pick of 7b677ed has failed:

On branch mergify/bp/stable/0.24/pr-9836
Your branch is up to date with 'origin/stable/0.24'.

You are currently cherry-picking commit 7b677edf1.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   qiskit/circuit/add_control.py
	new file:   releasenotes/notes/fix-mcrz-relative-phase-6ea81a369f8bda38.yaml
	modified:   test/python/circuit/test_controlled_gate.py
	modified:   test/qpy_compat/test_qpy.py

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   qiskit/circuit/library/standard_gates/multi_control_rotation_gates.py

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/github/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally


Mergify commands and options

More conditions and actions can be found in the documentation.

You can also trigger Mergify actions by commenting on this pull request:

  • @Mergifyio refresh will re-evaluate the rules
  • @Mergifyio rebase will rebase this PR on its base branch
  • @Mergifyio update will merge the base branch into this PR
  • @Mergifyio backport <destination> will backport this PR on <destination> branch

Additionally, on Mergify dashboard you can:

  • look at your merge queues
  • generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.com

@mergify mergify bot requested a review from a team as a code owner May 22, 2023 15:02
@mergify mergify bot added the conflicts used by mergify when there are conflicts in a port label May 22, 2023
@qiskit-bot
Copy link
Collaborator

Thank you for opening a new pull request.

Before your PR can be merged it will first need to pass continuous integration tests and be reviewed. Sometimes the review process can be slow, so please be patient.

While you're waiting, please feel free to review other open PRs. While only a subset of people are authorized to approve pull requests for merging, everyone is encouraged to review open pull requests. Doing reviews helps reduce the burden on the core team and helps make the project's code better for everyone.

One or more of the the following people are requested to review this:

  • @Cryoris
  • @Qiskit/terra-core
  • @ajavadia
  • @mtreinish
  • @nkanazawa1989

@mtreinish mtreinish added this to the 0.24.1 milestone May 22, 2023
@Cryoris Cryoris removed the conflicts used by mergify when there are conflicts in a port label May 23, 2023
adjs and others added 2 commits May 23, 2023 16:22
* efficient multicontrolled su2 gate decomposition

Co-authored-by: thiagom123 <thiagomdazevedo@hotmail.com>
Co-authored-by: IsmaelCesar <leamscesar@gmail.com>
Co-authored-by: Israel F. Araujo <israelferrazaraujo@hotmail.com>
Co-authored-by: Adenilton Silva <7927558+adjs@users.noreply.github.com>

* removed optimization flag

Co-authored-by: thiagom123 <thiagomdazevedo@hotmail.com>
Co-authored-by: IsmaelCesar <leamscesar@gmail.com>
Co-authored-by: Israel F. Araujo <israelferrazaraujo@hotmail.com>
Co-authored-by: Adenilton Silva <7927558+adjs@users.noreply.github.com>

* tox -eblack

* updated docstrings

* Adds `MCSU2Gate` to `__init__`

* fixed circular import

* defined control and inverse methods

* changed MCSU2Gate from Gate to ControlledGate

* adjusted some tests for controlled gates

* reformatting

* Fix regarding the integer `ctrl_state` parameter

* Tests to check the CX count upper bound

* Gate's `label` in the `control` function

* Upd. Qiskit tests to include cases for MCSU2Gate

* Upd. Qiskit tests to include cases for MCSU2Gate

* Revert "Upd. Qiskit tests to include cases for MCSU2Gate"

This reverts commit c1ceaf6.

* Revert "Upd. Qiskit tests to include cases for MCSU2Gate"

This reverts commit 7c75611.

* Revert "Tests to check the CX count upper bound"

This reverts commit 100a690.

* Update test_controlled_gate.py

* Update test_circuit_operations.py

* remove mcsu2gate class

* remove mcsu2gate class

* fix mcry

* lint

* fix mcrx

* add reference

* Create `s_gate` directly

* Revert "Create `s_gate` directly"

This reverts commit b762b39.

* review

* release notes

* review 2

* backwards compat

* function signature and number of controls

* fix mcrz

* Update multi_control_rotation_gates.py

* review

* Update test_qpy.py

* Revert "Update test_qpy.py"

This reverts commit fab1c80.

* Update test_qpy.py

* Update multi_control_rotation_gates.py

* Fix `use_basis_gates=True` case

* lint

---------

Co-authored-by: rafaella-vale <26910380+rafaella-vale@users.noreply.github.com>
Co-authored-by: thiagom123 <thiagomdazevedo@hotmail.com>
Co-authored-by: IsmaelCesar <leamscesar@gmail.com>
Co-authored-by: Israel F. Araujo <israelferrazaraujo@hotmail.com>
Co-authored-by: Rafaella Vale <rfv@cin.ufpe.br>
Co-authored-by: Julien Gacon <gaconju@gmail.com>
(cherry picked from commit 7b677ed)

# Conflicts:
#	qiskit/circuit/library/standard_gates/multi_control_rotation_gates.py
@Cryoris Cryoris force-pushed the mergify/bp/stable/0.24/pr-9836 branch from 71994c4 to 3cf22c5 Compare May 23, 2023 14:24
Copy link
Member

@jakelishman jakelishman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a little concerned about this behavioural change going into a patch release, but consensus from others seems to be in favour and the previous implementation was definitely incorrect.

For others: the version check in the QPY backwards-compatibility checks is reduced to 0.24.1 to reflect that these changes occur from that version (whereas the main branch specified 0.25.0). They won't actually trigger on this PR, since the version in the stable branch doesn't get updated until the patch release is actually made, but since it was tested on main, there hopefully shouldn't be problems.

@jakelishman jakelishman added this pull request to the merge queue May 23, 2023
Merged via the queue into stable/0.24 with commit c9656b2 May 23, 2023
@mergify mergify bot deleted the mergify/bp/stable/0.24/pr-9836 branch May 23, 2023 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants